package models

//用户
type User struct {
	Id int32 `gorm:"column:user_id;primaryKey"`
	Name string `valid:"Required;MinSize(4);MaxSize(12)"`
	Phone string `valid:"Mobile;Required"`
	Email string `valid:"Email;MaxSize(50)"`
	Pwd string `valid:"Required;MinSize(4);MaxSize(6)"`
	ConfirePwd string `gorm:"-" valid:"Required;MinSize(4);MaxSize(6)"`
	RegTime int64
}

//用户角色表
type UserRole struct {
	Id int32 `gorm:"column:user_id;primaryKey"`
	RoleId int32
}

//方法表
type Method struct {
	ID int32
	Name string
	ParentId int32
}

//角色表
type Role struct {
	RoleId int32 `gorm:"column:role_id;primaryKey"`
	Name string
}

//角色方法表
type RoleMethod struct {
	RoleId int32 `gorm:"column:role_id;primaryKey"`
	MethodId int32
}

//grpc服务模块表
type Service struct {
	ID uint32
	Name string
}
